#define GPIOE_MODER  	(*(volatile int*)(0x40021000 + 0x00))
#define GPIOE_IDR    	(*(volatile int*)(0x40021000 + 0x10))
#define GPIOE_PUPDR   (*(volatile int*)(0x40021000 + 0x0C))
#define RCC_AHB1ENR  	(*(volatile int*)(0x40023800 + 0x30))
	

void key_init()
{
	//E
	RCC_AHB1ENR |= (1 << 4);
	//PE4 0
	GPIOE_MODER &= ~(3 << 8);
	GPIOE_PUPDR |= (1<<8);
	GPIOE_PUPDR &= ~(1<<9);
	//PE3 1
	GPIOE_MODER &= ~(3 << 6);
	GPIOE_PUPDR |= (1<<6);
	GPIOE_PUPDR &= ~(1<<7);
	//PE2 2
	GPIOE_MODER &= ~(3 << 4);
	GPIOE_PUPDR |= (1<<4);
	GPIOE_PUPDR &= ~(1<<5);
}